'use strict';

app.controller('landLordRentAmountDetailCtl', function($element, $scope, $state, rest, user,$rootScope,ngDialog,uiLoad  ) {
    var data = angular.copy($scope.ngDialogData, {});
    var landlordId = user.get('landlordId');
    
    console.log(data);
    $scope.params = {};
    $scope.$on('msg2', function(e, msg) {
            $scope.confirm({});
            console.log(msg);
        });
    rest.post({
        methodId: '3008',
        data: {
            ContractId: data.orderId,
            LandordId: landlordId
        },
        success: function(res) {
            if (res.code == 0) {
              $rootScope.data = res.res.data.rows;
              $scope.$apply( function(){
                $rootScope.data = res.res.data.rows;
              } )
            }
          },
          error: function() {
            console.log( "失败！");
          }
    })

    

});